
export const namespace = 'counter';

export const actionType = {
  INCREMENT: `${namespace}/increment`,
  DECREMENT: `${namespace}/decrement`,
  RESET: `${namespace}/reset`
};

export const increment = data => {
  return {
    type: actionType.INCREMENT,
    data // 可以传递数据，这里简单示例为1
  };
};

export const decrement = data => {
  return {
    type: actionType.DECREMENT,
    data // 可以传递数据，这里简单示例为1
  };
};

export const reset = () => {
  return {
    type: actionType.RESET,
  };
}